package com.wash.car.dao.mapper;

import com.pmo.boot.db.PmoBaseMapper;
import com.wash.car.dao.domain.CarOrderDomain;
import com.wash.car.dao.model.OrderDetailsModel;

import java.util.List;
import java.util.Map;

/**
 * @author zjialin
 * @description 针对表【order(订单信息表)】的数据库操作Mapper
 * @createDate 2021-12-23 17:04:19
 * @Entity com.wash.car.dao.domain.CarOrderDomain
 */
public interface CarOrderMapper extends PmoBaseMapper<CarOrderDomain> {


    /**
     * 查询车辆是否在队列中
     *
     * @param plate
     * @return
     */
    int inTheQueue(String plate);


    /**
     * 查询门店当天正在排队的数量
     *
     * @param storeId
     * @return
     */
    int selectStoreQueueCount(Long storeId);


    /**
     * 查询用户车牌
     *
     * @param userId
     * @return
     */
    List<String> selectVehicles(Long userId);


    /**
     * 查询当天最新订单
     *
     * @param storeId
     * @return
     */
    CarOrderDomain selectLatestOrder(Long storeId);


    /**
     * 查询订单明细 查询订单详情
     *
     * @param map
     * @return
     */
    List<OrderDetailsModel> selectOrderDetails(Map<String, Object> map);


}
